package o;

import android.content.res.AssetFileDescriptor;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.File;
import java.io.InputStream;

public class vt<Data> implements vk<String, Data> {
    private final vk<Uri, Data> ˋ;

    public static class c implements vr<String, InputStream> {
        @NonNull
        public vk<String, InputStream> ˏ(@NonNull vo voVar) {
            return new vt(voVar.ˊ(Uri.class, InputStream.class));
        }

        public void ॱ() {
        }
    }

    public static class d implements vr<String, ParcelFileDescriptor> {
        @NonNull
        public vk<String, ParcelFileDescriptor> ˏ(@NonNull vo voVar) {
            return new vt(voVar.ˊ(Uri.class, ParcelFileDescriptor.class));
        }

        public void ॱ() {
        }
    }

    public static final class e implements vr<String, AssetFileDescriptor> {
        public vk<String, AssetFileDescriptor> ˏ(@NonNull vo voVar) {
            return new vt(voVar.ˊ(Uri.class, AssetFileDescriptor.class));
        }

        public void ॱ() {
        }
    }

    public /* synthetic */ boolean ˋ(@NonNull Object obj) {
        return ˏ((String) obj);
    }

    public vt(vk<Uri, Data> vkVar) {
        this.ˋ = vkVar;
    }

    public o.vk.c<Data> ˎ(@NonNull String str, int i, int i2, @NonNull sc scVar) {
        Uri ॱ = ॱ(str);
        if (ॱ == null || !this.ˋ.ˋ(ॱ)) {
            return null;
        }
        return this.ˋ.ˎ(ॱ, i, i2, scVar);
    }

    public boolean ˏ(@NonNull String str) {
        return true;
    }

    @Nullable
    private static Uri ॱ(String str) {
        if (TextUtils.isEmpty(str)) {
            return null;
        }
        if (str.charAt(0) == '/') {
            return ˋ(str);
        }
        Uri parse = Uri.parse(str);
        if (parse.getScheme() == null) {
            return ˋ(str);
        }
        return parse;
    }

    private static Uri ˋ(String str) {
        return Uri.fromFile(new File(str));
    }
}
